package com.ibeetl.eval;

import java.math.BigDecimal;
import java.util.List;

public class SumNodeArth implements NodeArth {

	public Object getValue(List<Object> list) {
		BigDecimal total = new BigDecimal(0); ;
		for(Object o :list){
			Number n = (Number)o;
			BigDecimal b = null;
			if(n instanceof BigDecimal){
				b = (BigDecimal)n;
			}
			b = new BigDecimal(n.toString());
			total =total.add(b);
			
		}
		return total;
	}

}
